import java.util.Scanner;

public class demo05 {
    //杨辉三角形
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int[][] arr=new int[101][101];
        for (int i = 1; i < arr.length; i++) {
            for (int j = 1; j < arr[i].length; j++) {
                if(j==1||i==j){
                    arr[i][j]=1;
                }
            }
        }
        for (int i = 2; i < arr.length; i++) {
            for (int j = 1; j <= i; j++) {
                arr[i][j]=arr[i-1][j-1]+arr[i-1][j];
            }
        }
        int n=sc.nextInt();
        int index=0;
        for (int i = 1; i < 101; i++) {
            for (int j = 1; j <= i; j++) {
                index++;
                if(n==arr[i][j]){
                    System.out.println(index);
                    return;
                }
            }
        }
    }
}
